package com.bwie.controller;

import com.bwie.common.domain.response.UserResponse;
import com.bwie.common.result.Result;
import com.bwie.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/auth")
@CrossOrigin
public class AuthController {

    @Autowired
    private AuthService authService;

    @GetMapping("/login/{tel}")
    public Result<UserResponse> login(@PathVariable String tel){
        UserResponse u = authService.login(tel);
        return Result.success(u);
    }


}
